import { ref } from 'vue'

export const useResource = () => {
	let disableResourceDialog = ref(false)
    let menuId = ref(0)
	const onResourceClose = () => {
        disableResourceDialog.value = false
	}

	const onOpenResource = (id:number) => {
        menuId.value = id
		disableResourceDialog.value = true
	}

    return {
        disableResourceDialog,
        menuId,
        onResourceClose,
        onOpenResource
    }
}
